JIT: remove getUnboxedEntry and getInstantiatedEntry#129285
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR removes the getUnboxedEntry / getInstantiatedEntry ICorJitInfo host APIs and instead plumbs unboxed-entry information through resolveVirtualMethod, updating the JIT, CoreCLR host, and SuperPMI tooling accordingly.
Changes:
- Populate
resolvedTokenDevirtualizedUnboxedMethodduring devirtualization and update JIT call/unboxing logic to consume it. - Remove
getUnboxedEntryandgetInstantiatedEntryfrom the public JIT/EE interface and all generated wrappers/shims. - Update SuperPMI recording/replay infrastructure and bump the JIT/EE versioning GUID.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/vm/jitinterface.cpp | Sets unboxed-entry method handle on devirtualization result. |
| src/coreclr/inc/corinfo.h | Removes APIs and documents new unboxed resolved-token behavior. |
| src/coreclr/jit/importercalls.cpp | Switches unboxed-entry transformation logic to use resolved token + signature inspection. |
| src/coreclr/jit/indirectcalltransformer.cpp | Uses unboxed method handle from resolved token for GDV inline demotion logic. |
| src/coreclr/jit/inline.h | Removes separate unboxed-entry handle storage; relies on resolved token. |
| src/coreclr/inc/jiteeversionguid.h | Bumps interface GUID for breaking API change. |
| src/coreclr/tools/superpmi/** | Removes the two API calls from interception/record/replay and related packet definitions. |
| src/coreclr/tools/aot/jitinterface/jitinterface_generated.h | Removes callbacks/wrapper methods for the deleted APIs. |
| src/coreclr/tools/Common/JitInterface/* | Updates thunk generator inputs and managed interop to drop deleted APIs. |
| // If we devirtualized into an unboxing stub, also hand back the unboxed entry | ||
| // so the jit can perform the unboxing transformation. | ||
| // | ||
| if (pDevirtMD->IsUnboxingStub()) | ||
| { | ||
| MethodDesc* pUnboxedMD = pDevirtMD->GetMethodTable()->GetUnboxedEntryPointMD(pDevirtMD); | ||
| info->resolvedTokenDevirtualizedUnboxedMethod.hMethod = (CORINFO_METHOD_HANDLE) pUnboxedMD; | ||
| } |
|
@jakobbotsch CI seems passing, but I guess this will need a pri1 test run to exercise more coverages. |
|
It seems that spmi gets skipped due to jit-ee interface changes. Trigger a MihuBot to check if it's zero diff. |
| if (pDevirtMD->IsUnboxingStub()) | ||
| { | ||
| MethodDesc* pUnboxedMD = pDevirtMD->GetMethodTable()->GetUnboxedEntryPointMD(pDevirtMD); | ||
| info->resolvedTokenDevirtualizedUnboxedMethod.hMethod = (CORINFO_METHOD_HANDLE) pUnboxedMD; | ||
| } |
| Packet_CompareTypesForCast = 163, | ||
| Packet_CompareTypesForEquality = 164, | ||
| Packet_GetUnboxedEntry = 165, | ||
| //Packet_GetUnboxedEntry = 165, |
| Packet_GetSZArrayHelperEnumeratorClass = 226, | ||
| Packet_GetMethodInstantiationArgument = 227, | ||
| Packet_GetInstantiatedEntry = 228, | ||
| //Packet_GetInstantiatedEntry = 228, |
|
Zero diff as expected. |
Cleanup
getUnboxedEntryandgetInstantiatedEntryand all their usages, so that we no longer need a round-trip between the JIT and EE.cc: @jakobbotsch